﻿#include "mapset.h"


void testset()
{
	Ysz::set<int> s;
	int a[] = { 4, 2, 6, 1, 3, 5, 15, 7, 16, 14 };
	for (auto e : a)
	{
		s.insert(e);
	}
	/*for (auto e : s)
	{
		cout << e << " ";
	}*/
	auto it = s.find(1024);
	//cout << *(s.find(7)) << endl;
	cout << endl;
	
}

void test_map()
{
	Ysz::map<string, string> dict;
	dict.insert({ "forward", "向前" });
	dict.insert({ "left", "左边" });
	dict.insert({ "right", "右边" });
	dict["left"] = "剩余";
	dict["insert"] = "插入";
	dict["string"];
	Ysz::map<string, string>::iterator it = dict.begin();
	while (it != dict.end())
	{
		
		it->second += "$";
		cout << it->first << ":" << it->second << endl;
		++it;
	}
	cout << endl;
}

int main()
{
	
	test_map();
	
	return 0;
}